﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace VueShopApi.Entities 
{
	/// <summary>
	/// 商品-属性关联表
	/// </summary>
	[JsonObject(MemberSerialization.OptIn), Table(Name = "sp_goods_attr", DisableSyncStructure = true)]
	public partial class SpGoodsAttr 
	{
		/// <summary>
		/// 主键id
		/// </summary>
		[JsonProperty("id"), Column(Name = "id", IsPrimary = true, IsIdentity = true)]
		public int Id { get; set; }

		/// <summary>
		/// 该属性需要额外增加的价钱
		/// </summary>
		[JsonProperty("add_price"), Column(Name = "add_price", DbType = "decimal(8,2)")]
		public decimal? AddPrice { get; set; }

		/// <summary>
		/// 属性id
		/// </summary>
		[JsonProperty("attr_id"), Column(Name = "attr_id")]
		public int AttrId { get; set; }

		/// <summary>
		/// 商品对应属性的值
		/// </summary>
		[JsonProperty("attr_value"), Column(Name = "attr_value", StringLength = -1, IsNullable = false)]
		public string AttrValue { get; set; }

		/// <summary>
		/// 商品id
		/// </summary>
		[JsonProperty("goods_id"), Column(Name = "goods_id", DbType = "mediumint(8) unsigned")]
		public int GoodsId { get; set; }

	}

}
